Technical Q&A QD61
GetPortBitMapForCopyBits



Q: What is GetPortBitMapForCopyBits and is it only for use with CopyBits?

A: GetPortBitMapForCopyBits is designed to do the right thing when extracting a BitMap/PixMap out of a GrafPort/CGrafPort/GWorld. If you are given a port and need to pull out the BitMap/PixMap to pass to a QuickDraw function that takes a pointer to a BitMap, then you should use GetPortBitMapForCopyBits.

While the name GetPortBitMapForCopyBits suggests that the function can only be used with CopyBits, there are a number of other APIs in QuickDraw that have BitMap pointers for parameters but can take PixMap pointers as well. CopyMask and CopyDeepMask are two examples.

[Nov 08 2000]


Developer Documentation | Technical Notes | Development Kits | Sample Code